//
//  OrderViewContentCell.m
//  Peso Guide
//
//  Created by macbook on 2025/6/29.
//

#import "OrderViewContentCell.h"

@interface OrderViewContentCell ()

@property (nonatomic, strong) UILabel *titLabel;
@property (nonatomic, strong) UILabel *contentLabel;

@end

@implementation OrderViewContentCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titLabel = [PesoKit createLabelWithFrame:CGRectMake(12, 0, (KScreenWidth-32-34)-24, 28) backGroundColor:[UIColor clearColor] text:@"" textColor:ColorHex(@"#999999") font:FONT(FontWeightStyleRegular, 14)];
        [self.contentView addSubview:_titLabel];
        
        _contentLabel = [PesoKit createLabelWithFrame:CGRectMake(12, 0, (KScreenWidth-32-34)-24, 28) backGroundColor:[UIColor clearColor] text:@"" textColor:ColorHex(@"#0E1D31") font:FONT(FontWeightStyleRegular, 14)];
        _contentLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_contentLabel];
    }
    return self;
}

- (void)setDataDic:(NSDictionary *)dataDic {
    _dataDic = dataDic;
    
    NSString *accidental = [NSString stringWithFormat:@"%@",[dataDic safeObjectForKey:@"accidental"]];
    NSString *representation = [NSString stringWithFormat:@"%@",[dataDic safeObjectForKey:@"representation"]];
    
    _titLabel.text = accidental;
    _contentLabel.text = representation;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
